<!--
  ~ MIT License
  ~
  ~ Copyright (c) 2021-2022 yangrunkang
  ~
  ~ Author: yangrunkang
  ~ Email: yangrunkang53@gmail.com
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  -->

<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<body>

<div th:fragment="nav_content(total,source)">
    <nav class="mb-2">
        <div class="nav nav-tabs">
            <a class="nav-item nav-link cv-link user_manage_content" href="/user/manage/content">文章管理<span th:if="${source == 'content'}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark ms-1" th:text="${total}"></span></a>
            <a class="nav-item nav-link cv-link user_manage_radio" href="/user/manage/radio">电台管理<span th:if="${source == 'radio'}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark ms-1" th:text="${total}"></span></a>
            <a class="nav-item nav-link cv-link user_manage_draft text-danger" href="/user/manage/draft">草稿箱<span th:if="${source == 'draft'}" class="badge bg-gradient rounded-3 fw-normal bg-danger ms-1" th:text="${total}"></span></a>
<!--            <a class="nav-item nav-link cv-link user_manage_content-settings" href="/user/manage/content-settings">设置<span th:if="${source == 'content-settings'}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark ms-1" th:text="${total}"></span></a>-->
        </div>
    </nav>
</div>

<div th:fragment="user_settings(source)">
    <nav class="mb-3">
        <div class="nav nav-tabs">
            <a th:class="${source == 'editUserInfo'}?'nav-item nav-link cv-link active' : 'nav-item nav-link cv-link'" href="/user/manage/edit-user-info">完善用户信息</a>
            <a th:class="${source == 'bgStyleSettings'}?'nav-item nav-link cv-link active' : 'nav-item nav-link cv-link'" href="/user/manage/bg-style-settings">背景设置</a>
            <a th:class="${source == 'uploadUserVia'}?'nav-item nav-link cv-link active' : 'nav-item nav-link cv-link'" href="/user/manage/upload-profile-photo">用户头像</a>
            <a th:class="${source == 'userDefaultContent'}?'nav-item nav-link cv-link active' : 'nav-item nav-link cv-link'" href="/user/manage/default-content-setting">内容喜好设置</a>
        </div>
    </nav>
</div>

<span th:fragment="manage_content_tag(contentEnhance)">
    <span th:each="tagDto : ${contentEnhance.tagDtoList}">
            <a th:href="'/tag/'+${tagDto.tagName}" th:title="${tagDto.tagName}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark cv-link me-1">[[${tagDto.tagName}]]</a>
    </span>
</span>



</body>
</html>
